'use strict';

module.exports = app => {
    const { STRING, UUID, UUIDV4, INTEGER, DECIMAL, DATE } = app.Sequelize;

    const model = app.model.define('visit_fee', {
        id: {
            type: UUID,
            primaryKey: true,
            defaultValue: UUIDV4,
            comment: '主键',
        },
        fee: {
            type: DECIMAL(10, 2),
            comment: '费用'
        },
        fee_id: {
            type: UUID,
            comment: '费用类别Id 对应字典Id'
        },
        fee_name: {
            type: STRING,
            comment: '费用名称'
        },
        visit_id: {
            type: UUID,
            comment: '拜访表主键'
        },
    },
        {
            tableName: 'visit_fee',
            comment: '客户拜访表',
        });

    return model;
};
